# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contibutor: Pierre Neidhardt <ambrevar@gmail.com>

pkgname=python-keyutils
pkgver=0.6
pkgrel=9
pkgdesc="A set of python bindings for keyutils"
arch=("loong64" "x86_64")
url="https://github.com/sassoftware/python-keyutils"
license=("Apache")
# python-pytest-runner in makedepends due to be set in setup_requires (which is wrong upstream)
depends=("python" "keyutils")
makedepends=("python" "python-setuptools" "python-pytest-runner" "cython")
checkdepends=("python-pytest")
source=("$pkgname-$pkgver.tar.gz::https://github.com/sassoftware/python-keyutils/archive/$pkgver.tar.gz")
sha256sums=('f69e6cadc50525dcb117714e440ee6579b0e5b7f12910b2bb2e910b236a2b18b')

build(){
	cd "$pkgname-$pkgver"
	cython keyutils/_keyutils.pyx
	python setup.py build
}

package(){
	cd "$pkgname-$pkgver"
	python setup.py install --root="$pkgdir" --prefix=/usr --optimize=1 --skip-build
}
